[ASP.NET MVC] How to eliminate ReturnUrl from the browser address

Posted by Alexander Efimov on Stack Overflow See other posts from Stack Overflow or by Alexander Efimov
Published on 2010-03-30T08:22:37Z Indexed on 2010/04/08 12:43 UTC
Read the original article Hit count: 375

Filed under:

Hi, guys. Now on unauthorized attempt to access an action my ASP.NET MVC app redirects user to the login page and generates URL shown below:

http://www.mysite.com/Account/Log?ReturnUrl=%2Ftest%2Fsampleaction

So, is there a way to eliminate this string from the URL, but to save it somewhere to be able to redirect user back after login?

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2